

package gruppe1projekt;
import gruppe1projekt.ControllerLayer.*;
import gruppe1projekt.GUILayer.*;
import gruppe1projekt.ModelLayer.*;
import gruppe1projekt.TUILayer.RecursiveTest;
import gruppe1projekt.TUILayer.RentTUI;
import java.util.Date;
import java.util.ArrayList;
import javax.swing.plaf.synth.Region;

public class DataMaker
{
    public DataMaker()
    {
        
    }

    public void MakeData()
    {
        ProductContainer container = ProductContainer.getInstance();
        Product product1 = new Product("Is", "Desc", 134, null, 2394, 4, false);
        product1.setIsDiscontinued(true);
        Product product2 = new Product("Grisetryne", "Desc", 134, null, 34510, 4, false);
        Product product3 = new Product("Monster", "Desc", 134, null, 598237, 4, false);
        Product product4 = new Product("Tyr", "Desc", 134, null, 34589, 4, false);
        product4.setIsDiscontinued(true);
        Product product5 = new Product("Stef", "Desc", 134, null, 2354, 4, false);
        Product product6 = new Product("Bizze", "Desc", 134, null, 1234623, 4, false);
        Product product7 = new Product("Kano", "Desc", 134, null, 235987, 4, false);
        product7.setIsDiscontinued(true);
        Product product8 = new Product("Kanonkugle", "Desc", 134, null, 91239, 4, false);
        Product product9 = new Product("Fingerbøl", "Desc", 134, null, 2398471, 4, false);
        Product product10 = new Product("Malte", "Desc", 134, null, 92384, 4, false);
        Product product11 = new Product("Einstein", "Desc", 134, null, 3892347, 4, false);

        product1.addPrice(new Price(240, false));
        product1.addPrice(new Price(new Date(), new Date(2010, 7, 1), null, 199, true));
        product2.addPrice(new Price(543, true));
        product3.addPrice(new Price(421, false));
        product4.addPrice(new Price(31, true));
        product5.addPrice(new Price(21, false));
        product6.addPrice(new Price(42, true));
        product7.addPrice(new Price(6753, false));
        product8.addPrice(new Price(7863, false));
        product9.addPrice(new Price(123, true));
        product10.addPrice(new Price(4215, false));
        product11.addPrice(new Price(324, true));


        container.createProduct(product1);
        container.createProduct(product2);
        container.createProduct(product3);
        container.createProduct(product4);
        container.createProduct(product5);
        container.createProduct(product6);
        container.createProduct(product7);
        container.createProduct(product8);
        container.createProduct(product9);
        container.createProduct(product10);
        container.createProduct(product11);


        EmployeeContainer econ = EmployeeContainer.GetInstance();
        EmployeeController emcontroller = new EmployeeController();
        ArrayList<Employee> el = new ArrayList<Employee>();
        el.add(new Employee("Stefan", "123", "Stefan Hedegaard", "Molndalsvej 4", "Norresundby", "Danmark", "Nordjylland", "9400"));
        el.add(new Employee("Malte", "123", "Malte Von Boten", "Molndalsvej 4", "Norresundby", "Danmark", "Nordjylland", "9400"));
        el.add(new Employee("Jesper", "123", "Evil J", "Molndalsvej 4", "Norresundby", "Danmark", "Nordjylland", "9400"));
        el.add(new Employee("Kristian", "123", "Krbyr", "Molndalsvej 4", "Norresundby", "Danmark", "Nordjylland", "9400"));
        econ.setEmployees(el);


        RentContainer rcon = RentContainer.getInstance();
        rcon.addRentableItem(new RentableItem("Spade", "Dette er en spade", 50, 1337));
        rcon.addRentableItem(new RentableItem("Hammer", "Dette er en hammer", 20, 1336));
        rcon.addRentableItem(new RentableItem("Støvle", "Dette er en støvle", 10, 1334));
        rcon.addRentableItem(new RentableItem("Båd", "Dette er en båd", 1000, 1333));
        rcon.addRentableItem(new RentableItem("Søm", "Dette er søm", 10, 1332));


        SupplyContainer sp = SupplyContainer.getInstance();

        ArrayList<Supplier> supplierlist = new ArrayList<Supplier>();
        supplierlist.add(new Supplier("XL", "Solvej 6", "Hobro", "9500", "Danmark", "Stefan Boss Andersen", "xl@xl.com", "13371337"));
        supplierlist.add(new Supplier("Bygger", "hansvej 3", "Aalborg", "9000", "Danmark", "Boss", "byg@xl.com", "23234551"));
        sp.setSuppliers(supplierlist);

        sp.setReSupplyInterval(100);

        ArrayList<SupplySale> orderslist = new ArrayList<SupplySale>();
        ArrayList<ProductSalesLine> psl = new ArrayList<ProductSalesLine>();
        psl.add(new ProductSalesLine(product9, 123));
        ArrayList<ProductSalesLine> psl2 = new ArrayList<ProductSalesLine>();
        psl.add(new ProductSalesLine(product4, 12));
        orderslist.add(new SupplySale(emcontroller.getEmployee("Stefan"), psl));
        orderslist.add(new SupplySale(emcontroller.getEmployee("Stefan"), psl2));
        sp.setOrders(orderslist);

    }
    }